package com.ls.service.Impl;

import com.ls.dao.DeviceMapper;
import com.ls.service.DeviceService;
import com.ls.pojo.Device;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("deviceService")
public class DeviceServiceImpl implements DeviceService {

    @Autowired
    private DeviceMapper deviceMapper;

    public void setDeviceMapper(DeviceMapper deviceMapper) {
        this.deviceMapper = deviceMapper;
    }

    @Override
    public List<Device> getDeviceAll() {
        return deviceMapper.getDeviceAll();
    }

    @Override
    public int addDevice(Device device) {
        return deviceMapper.addDevice(device);
    }

    @Override
    public int updateDevice(Integer id, Integer status) {
        return deviceMapper.updateDevice(id,status);
    }

    @Override
    public int delete(Device id) {
        return deviceMapper.delete(id);
    }


}
